package com.wontube.smr.web.client.admin;

import java.util.List;

import com.wontube.client.modle.vo.PagenateInfo;
import com.wontube.smr.web.client.model.po.Blog;
import com.wontube.smr.web.client.model.po.BlogCategory;
import com.wontube.smr.web.client.model.po.BlogTag;
import com.wontube.smr.web.client.model.vo.BlogItems;

/**
 * @author tanggf(2012-5-25)
 *
 */
public interface IAdminBlogHandler {
	/**
	 * @param pageInfo
	 * @return
	 */
	BlogItems listBlogs(Integer status, String category, PagenateInfo pageInfo);
	
	/**
	 * get blog detail by pk
	 * @param urlTitle
	 * @return
	 */
	Blog getBlog(String id);
	
	/**
	 * 增加/更新blog
	 * @param blog
	 * @return
	 */
	boolean addOrUpdateBlog(Blog blog);
	
	/**
	 * 删除blog
	 * @param id
	 * @return
	 */
	boolean deleteBlog(String id);
	
	/**
	 * 发布blog
	 * @param id
	 * @return
	 */
	boolean releaseBlog(String id);
	
	/**
	 * 取消发布blog,打回草稿状态
	 * @param id
	 * @return
	 */
	boolean cancleBlog(String id);
	
	/**
	 * 取消删除blog,打回草稿状态
	 * @param id
	 * @return
	 */
	boolean recallBlog(String id);
	
	boolean addBlogCategory(BlogCategory cate);	
	boolean deleteBlogCategory(String id);	
	List<BlogCategory> listAllBlogCategories();
	
	int addBlogTag(BlogTag tag);	
	int deleteBlogTag(String id);	
	List<BlogTag> listAllBlogTags();
	
	/**
	 * [0]: blog category list
	 * [1]: blog tag list
	 * @return
	 */
	Object[] listAllBlogCategoryAndTags();
}
